package org.feng.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 权限数据区域
 *
 * @author fengjinsong
 */
@Getter
@AllArgsConstructor
public enum PermissionDataScope implements IBaseEnum<String> {

    ALL("all", "可以查看所有数据"),
    DEPT("dept", "可以查看部门所有数据"),
    MYSELF("myself", "只能查看自己相关的数据")
    ;

    private final String code;
    private final String desc;

    public static PermissionDataScope getInstance(String code) {
        return IBaseEnum.getEnum(code, PermissionDataScope.values());
    }
}
